package main

func convertToTitle(columnNumber int) string {
	var buf []byte
	for columnNumber > 0 {
		columnNumber--
		b := 'A' + byte(columnNumber%26)
		buf = append(buf, b)
		columnNumber /= 26
	}
	i := 0
	j := len(buf) -1
	for i < j {
		buf[i], buf[j] = buf[j], buf[i]
		i++
		j--
	}
	return string(buf)
}

func main() {
	result := convertToTitle(701)
	println(result)
}